#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+1000;
typedef long long LL;
LL a[maxn];
int main(void)
{
  cin.tie(0);std::ios::sync_with_stdio(false);
  LL t;cin>>t;
  while(t--){
    LL n,x;cin>>n>>x;
    for(LL i=1;i<=n;i++) cin>>a[i];
    LL sum=0;LL ans=0;
    for(LL i=1;i<=n;i++){
        sum+=ceil(1.0*a[i]/x);
        ans+=a[i];
    }
    ans=ceil(1.0*ans/x);
    cout<<min(ans,sum)<<" "<<max(ans,sum)<<endl;
  }
return 0;
}
